Skip to content

kadai3-1-torotake #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

kadai3-1-torotake #31

wants to merge 1 commit into from

Conversation

torotake
Copy link

@torotake torotake commented Aug 7, 2019

Gopher道場#6 課題3-1

タイピングゲームを作ろう

[x] 標準出力に英単語を出す(出すものは自由)
[x] 標準入力から1行受け取る
[x] 制限時間内に何問解けたか表示する

[x] 制限時間にはtime.After関数を用いる
[x] select構文を用いる

ビルド

$ go build -o game main.go

Usage

$ game <options>

options
-f [問題文ファイルのパス] : 問題文ファイル (デフォルト:カレントディレクトリのwords.txt)
-t [制限時間(秒)] : 制限時間 (デフォルト:30秒)

問題文ファイルについて

  • 英単語を並べたテキストファイル
  • 1行が1問となる
  • 前後の空白はトリムされ、空行は無視される
  • 問題はランダムに選択される (重複あり)

気になるところ

  • タイムアウトのテストがこれで良いのかどうか
  • ランダム出題のテストが出来ていない

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant